window.addEventListener('load', function() {
    var ul1 = document.querySelector('.uu');
    var lis = ul1.querySelectorAll('li');

    var meiti_bd = document.querySelector('.meiti-bd');
    var liss = document.querySelectorAll('.meiti-bd>li');

    for (var i = 0; i < lis.length; i++) {
        lis[i].setAttribute('index', i);

        lis[i].addEventListener('click', function() {

            for (var i = 0; i < lis.length; i++) {
                lis[i].className = '';
            }
            var index = this.getAttribute('index')
            console.log(index);
            this.className = 'meiti_currentt';
            donghua(meiti_bd, -390 * index);
        })


    }


    var ul2 = document.querySelector('.uu2');
    var lis2 = ul2.querySelectorAll('li');

    var meiti_bd2 = document.querySelector('.meiti-bd2');


    for (var i = 0; i < lis.length; i++) {
        lis2[i].setAttribute('index', i);

        lis2[i].addEventListener('click', function() {

            for (var i = 0; i < lis2.length; i++) {
                lis2[i].className = '';
            }
            var index = this.getAttribute('index')
            console.log(index);
            var a = -390 * index;

            this.className = 'meiti_currentt';

            donghua(meiti_bd2, a);

        })

    }

})